{% extends "base.html" %}
{% block content %}
    <h1>Hello,<a href="/{{ current_user.username }}">{{ current_user.username }}</a></h1>
    <form action="" method="post">
        {{ form.hidden_tag() }}
        <p>
            {{ form.tweet.label }}<br>
            {{ form.tweet(cols=50, rows=4) }}<br>
            {% for error in form.tweet.errors %}
            <span style="color:red;"> {{ error }}</span>
            {% endfor %}
        </p>
        <p>
            {{ form.submit() }}
        </p>
    </form>

    {% include '_tweets.html' %}
    {% if prev_url %}
    <a href="{{ prev_url }}">Prev Page</a>
    {% endif %}
    {% if next_url %}
    <a href="{{ next_url }}">Next Page</a>
    {% endif %}
{% endblock %}
</body>
</html>